import { Component, OnInit } from '@angular/core';
import { Todos } from '../stores/todos';

@Component({
  selector: 'app-my',
  templateUrl: './my.component.html',
  styleUrls: [ './my.component.css' ]
})
export class MyComponent implements OnInit {
  title = ''

  constructor(public todos: Todos) {
  }

  ngOnInit() {
  }

  addTodo() {
    this.todos.addTodo({ title: this.title })
    this.title = ''
  }

}
